package com.alibaba.citrus.cr.platform.enhance.functions.inventoryAllot.factory;

import com.alibaba.citrus.cr.common.util.SpringContextUtil;
import com.alibaba.citrus.cr.platform.enhance.functions.inventoryAllot.entity.InventoryAllotEntity;
import com.alibaba.citrus.cr.platform.enhance.repository.InventoryAllotQueryRepository;

import com.epoch.app.bcorder.service.BaseDataService;
import com.epoch.app.crplatformenhance.model.dto.*;

public class InventoryAllotFactory {

    private static InventoryAllotQueryRepository inventoryAllotQueryRepository;
    private static BaseDataService baseDataService;

    static {
        inventoryAllotQueryRepository = SpringContextUtil.getBean(InventoryAllotQueryRepository.class);
        baseDataService = SpringContextUtil.getBean(BaseDataService.class);

    }

    public static InventoryAllotEntity createInventoryAllot(InventoryAllotSDO inventoryAllotSDO) {
        InventoryAllotEntity inventoryAllotEntity = InventoryAllotEntity.of(inventoryAllotSDO);
        return inventoryAllotEntity;
    }

    public static InventoryAllotEntity excelImport(InventoryAllotSDO inventoryAllotSDO) {
        return null;
    }

    public static InventoryAllotEntity deleteById(DeleteInventoryAllotByIdRequest deleteInventoryAllotByIdRequest) {
        InventoryAllotSDO inventoryAllotSDO = new InventoryAllotSDO();
        inventoryAllotSDO.setId(deleteInventoryAllotByIdRequest.getId());
        return InventoryAllotEntity.of(inventoryAllotSDO);
    }
}
